#!/usr/bin/env bash
function _start_all() {
    docker-compose -f dc.yaml up -d --remove-orphans
}
function _stop_all() {
    docker-compose -f dc.yaml stop
}
function _down_all() {
    docker-compose -f dc.yaml down --remove-orphans
}
function _cmd_ps() {
    docker-compose -f dc.yaml ps
}

if [ "$1" = "" -o "$1" = "start" -o "$1" = "up" ]; then
    _start_all
elif [ "$1" = "stop" ]; then
    _stop_all
elif [ "$1" = "down" ]; then
    _down_all
elif [ "$1" = "ps" ]; then
    _cmd_ps
else
    echo "Unknown command: $1"
fi
